package com.xl98.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.xl98.entity.Complain;
import com.xl98.entity.Treehole;
import com.xl98.mapper.ComplainMapper;
import com.xl98.service.ComplainService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ls
 * @since 2020-05-22
 */
@Service
public class ComplainServiceImpl extends ServiceImpl<ComplainMapper, Complain> implements ComplainService {
     @Autowired
    private ComplainMapper complainMapper;
    @Override
    public List<Complain> findComplain(Map<String, String> map) {
        return complainMapper.findComplain(map);
    }

    @Override
    public int insertArticleIdByupdate(Map<String, String> map) {
        return complainMapper.insertArticleIdByupdate(map);
    }

    @Override
    public int addComplain(Complain complain) {
        return complainMapper.insert(complain);
    }

    @Override
    public boolean delete(String id) {
        if(complainMapper.deleteById(id)>0){
            return true;
        }
        return false;
    }


}
